package com.bbcare.followup.plat.service.impl;

import com.bbcare.followup.plat.entity.FuTemplateRecord;
import com.bbcare.followup.plat.service.FuTemplateRecordService;
import com.bbcare.followup.plat.store.ibatis.FuTemplateRecordMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Title		FuTemplateRecordServiceImpl.java
 * @Package		com.bbcare.followup.plat.service.impl
 * @Description	TODO
 * @Author		<a href="mailto:jiangqian_java@163.com">jiang</a>
 * @Date		2023/10/18
 * @Version		V1.0 
 * @Copyright	(c) Shanghai BBcare Medical Equipment Co.,Ltd.
 */
@Service
public class FuTemplateRecordServiceImpl implements FuTemplateRecordService {

    @Resource
    private FuTemplateRecordMapper fuTemplateRecordMapper;


    @Override
    public Object insert(FuTemplateRecord fuTemplateRecord) {
        return fuTemplateRecordMapper.insert(fuTemplateRecord);
    }


    @Override
    public Object delete(int id) {
        return fuTemplateRecordMapper.delete(id);
    }


    @Override
    public Object update(FuTemplateRecord fuTemplateRecord) {
        return fuTemplateRecordMapper.update(fuTemplateRecord);
    }


    @Override
    public FuTemplateRecord load(int id) {
        return fuTemplateRecordMapper.load(id);
    }


    @Override
    public Map<String,Object> getList(Map map) {

        List<FuTemplateRecord> pageList = fuTemplateRecordMapper.getList(map);
        int totalCount = fuTemplateRecordMapper.pageListCount(map);

        // result
        Map<String, Object> result = new HashMap<String, Object>();
        result.put("pageList", pageList);
        result.put("totalCount", totalCount);

        return result;
    }

}